﻿using Abp.Application.Services;
using FwProject.ShopApplication;
using FwProject.ShoppingMall.EventAdvertising;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.EventAdvertising.Dto
{
    /// <summary>
    /// 秒杀管理
    /// </summary>
   public interface IShopSecondkillAppService : IApplicationService
    {
        #region 秒杀管理
        /// <summary>
        /// 创建一个秒杀活动
        /// </summary>
        /// <param name="Input">模型</param>
        /// <returns></returns>
        Task<Guid> CreateShopSecondkill(ShopSecondkillInput Input);
        /// <summary>
        /// 修改一个秒杀信息
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task EditShopSecondkill(Guid Id, ShopSecondkillInput Input);
        /// <summary>
        /// 删除一个秒杀活动
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task DeleteShopSecondkill(Guid Id);
        /// <summary>
        /// app 获取秒杀活动信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<IPagedList<ShopSecondkillAppDto>> GetAppSecondkillPageList(int page, int pageSize);
        /// <summary>
        /// 通过商品id查看商品是否秒杀商品
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        Task<ShopSecondkillDto> GetAppByShopIdSkill(Guid shopId);
        #endregion

        #region 后台管理

        /// <summary>
        /// 后台管理-获取秒杀活动列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="keyword"></param>
        /// <param name="range"></param>
        /// <returns></returns>
        Task<LayerDataBaseDto> GetSpikeLayerDataAsync(int page, int limit, string keyword, string range);

        /// <summary>
        /// 后台管理-创建多个秒杀活动
        /// </summary>
        /// <returns></returns>
        Task CreateBatchesAsync(ShopSecondkillBackstageEnterDto input);

        /// <summary>
        /// 后台管理-根据Id获取秒杀活动实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ShopSecondkillOutputDto> GetEntityByIdAsync(Guid id);

        /// <summary>
        /// 后台管理-更新秒杀活动实体
        /// </summary>
        /// <param name="id"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ModifyAsync(Guid id, ShopSecondkillBackstageEnterDto input);

        #endregion
    }
}
